package com.skp.shaphan.ui.buttons;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;

import javax.swing.JButton;
import javax.swing.JPanel;

/**
 * A generate pane that holds a group of buttons and displays them horizontally
 * @author Stephen Phillips
 *
 */
public class ButtonsPane extends JPanel {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1322401653779683035L;

	public ButtonsPane(JButton ... buttons) {
		this.setLayout(new GridBagLayout());
		int column = 0;
		for(JButton button : buttons) {
			this.add(button, new GridBagConstraints(column++, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 5, 5));
		}
	}
}
